﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OmniKits.Extensions
{
    public static class ListExtensions
    {
#pragma warning disable 1591

        public static void ClearArrayData<T>(this IList<T> source)
        {
            for (var i = 0; i < source.Count; i++)
                source[i] = default(T);
        }

        public static IList<T> ReverseArray<T>(this IList<T> source)
        {
            var resultArray = source.ToArray();

            Array.Reverse(resultArray);

            return resultArray;
        }
    }
}
